import React from "./core/React.js";
function Foo() {
  const [count, setCount] = React.useState(10);
  function handleClick() {
    setCount((c) => c + 1);
  }
  React.useEffect(() => {
    return () => {
      console.log("cleanup 0");
    };
  }, []);
  React.useEffect(() => {
    console.log("update", count);
    return () => {
      console.log("cleanup 1");
    };
  }, [count]);
  React.useEffect(() => {
    console.log("update", count);
    return () => {
      console.log("cleanup 2");
    };
  }, [count]);
  return (
    <div>
      foo count: {count}
      <div>
        <button onClick={handleClick}>click</button>
      </div>
    </div>
  );
}
function App() {
  return (
    <div id="app">
      mini-react-app
      <Foo></Foo>
    </div>
  );
}
export default App;
